/**
 * 系统api配置
 * @param {Object} http
 */
export function sysload(http) {
	let menus = (data = {}) => http.get("/menus.json", { baseURL: "/" })
	let adminList = (data = {}) => http.post("resource/admin/list", data)
	let adminEdit = (data = {}) => http.post("resource/admin/edit", data)
	let adminConfigs = (data = {}) => http.post("resource/admin/configs", data)
	let adminDel = (data = {}) => http.post("resource/admin/delete", data)
	let adminAdd = (data = {}) => http.post("backend/admin/register", data)
	let adminResetPassword = (data = {}) => http.post("backend/admin/reset-password", data)

	let logsList = (data = {}) => http.post("resource/logs/list", data)
	let logsTotalList = (data = {}) => http.post("/totals", data)

	return {
		menus,
		adminConfigs,
		adminList,
		adminEdit,
		adminDel,
		adminAdd,
		adminResetPassword,
		logsList,
		logsTotalList
	}
}
